import { createRouter, createWebHistory } from 'vue-router';
import GoodsInfo from '../components/GoodInfo.vue';
import HomePage from '../components/HomePage.vue';
import ShopCar from '../components/ShopingCar.vue';
import UserInfo from '../components/UserInfoPage.vue';
import Login from '../components/LoginPage.vue';
import Register from '../components/RegisterPage.vue';

const routes = [
    {
        path: '/',
        name: 'HomePage',
        component: HomePage,
    },
    {
        path: '/goods-info',
        name: 'GoodsInfo',
        component: GoodsInfo,
    },
    {
        path: '/shop-car',
        name: 'ShopCar',
        component: ShopCar,
    },
    {
        path: '/user-info',
        name: 'UserInfo',
        component: UserInfo,
    },
    {
        path: '/login',
        name: 'Login',
        component: Login,
    },
    {
        path: '/register',
        name: 'Register',
        component: Register,
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
